<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>File Source for Translatable.class.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
											</head>
		<body>
						<h1>Source for file Translatable.class.php</h1>
<p>Documentation is available at <a href="../DomAr/Plugin/_libs---DomAr---Handlers---Translatable.TEST---Translatable.class.php.html">Translatable.class.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">*&nbsp;Plugin&nbsp;that&nbsp;helps&nbsp;to&nbsp;control&nbsp;dates.</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Oliver&nbsp;Leisalu</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;DomAr</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@subpackage</span><span class="src-doc">&nbsp;Plugin</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-key">class&nbsp;</span><a href="../DomAr/Plugin/DomArTranslatable.html">DomArTranslatable</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../DomAr/Plugin/DomArPlugin.html">DomArPlugin</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a10"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc-type">Array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a13"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../DomAr/Plugin/DomArTranslatable.html#var$languages">$languages</a>&nbsp;=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a14"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">String&nbsp;</span><span class="src-doc-var">$var&nbsp;</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">String&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a18"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArTranslatable.html#method__set">__set</a><span class="src-sym">(&nbsp;</span><span class="src-var">$var</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a19"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArTranslatable.html#var$languages">languages</a><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$var</span><span class="src-sym">)</span><span class="src-sym">]&nbsp;</span>=&nbsp;(string)<span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a20"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a21"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">String&nbsp;</span><span class="src-doc-var">$var&nbsp;</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a24"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArTranslatable.html#method__get">__get</a><span class="src-sym">(&nbsp;</span><span class="src-var">$var&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArTranslatable.html#var$languages">languages</a><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$var</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a26"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a27"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">String&nbsp;</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArTranslatable.html#method__toString">__toString</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a31"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$key&nbsp;</span>=&nbsp;<span class="src-id"><a href="../DomController/DomLanguage.html">DomLanguage</a></span><span class="src-sym">::</span><a href="../DomController/DomLanguage.html#methodgetk">getk</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-sym">!</span><span class="src-var">$key&nbsp;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a33"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">RuntimeException</span><span class="src-sym">(</span><span class="src-str">'Language&nbsp;key&nbsp;cannot&nbsp;be&nbsp;loaded!'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a34"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a35"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>(string)<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArTranslatable.html#var$languages">languages</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a38"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Oliver&nbsp;Leisalu</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;DomAr</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@subpackage</span><span class="src-doc">&nbsp;Plugin</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-key">class&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html">DomArProperty_DomArTranslatable</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../DomAr/Property/DomArProperty_Plugin.html">DomArProperty_Plugin</a>&nbsp;<span class="src-key">implements&nbsp;</span><a href="../DomAr/Property/IDomArPropertyAlterTableListener.html">IDomArPropertyAlterTableListener</a><span class="src-sym">,</span><a href="../DomAr/Property/IDomArPropertyInsertListener.html">IDomArPropertyInsertListener</a><span class="src-sym">,</span><a href="../DomAr/Property/IDomArPropertyUpdateListener.html">IDomArPropertyUpdateListener</a><span class="src-sym">,</span><a href="../DomAr/Property/IDomArPropertyBeforeSetListener.html">IDomArPropertyBeforeSetListener</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#var$defaultValue">$defaultValue</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#method__construct">__construct</a><span class="src-sym">(&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$defaultValue&nbsp;</span>=&nbsp;<span class="src-id">NULL&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a51"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">__construct</span><span class="src-sym">(&nbsp;</span><span class="src-var">$name&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a52"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#var$defaultValue">defaultValue</a>&nbsp;=&nbsp;<span class="src-var">$defaultValue</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a53"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodinit">init</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-key">array&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$values&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a56"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>(string)<span class="src-var">$values</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">name</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">load</span><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$propertyValue&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$d&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../DomAr/Plugin/DomArDate.html">DomArDate</a></span><span class="src-sym">(&nbsp;(</span><span class="src-var">$propertyValue&nbsp;</span>!==&nbsp;<span class="src-id">NULL&nbsp;</span>?&nbsp;<span class="src-var">$propertyValue&nbsp;</span>:&nbsp;<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#var$defaultValue">defaultValue</a>&nbsp;?&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#var$defaultValue">defaultValue</a>&nbsp;:&nbsp;<span class="src-id">NULL</span><span class="src-sym">))&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$d</span><span class="src-sym">-&gt;</span><span class="src-id">changeParent</span><span class="src-sym">(&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a63"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$d</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodbeforeSet">beforeSet</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$oldPropertyValue</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$newPropertyValue&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$newPropertyValue</span><span class="src-sym">)&nbsp;)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$newPropertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">changeParent</span><span class="src-sym">(&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$newPropertyValue&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../DomAr/Plugin/DomArDate.html">DomArDate</a></span><span class="src-sym">(&nbsp;</span><span class="src-var">$newPropertyValue</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$newPropertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">changeParent</span><span class="src-sym">(&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodisLoaded">isLoaded</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$propertyValue&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodvalidate">validate</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$propertyValue</span><span class="src-sym">,&nbsp;</span><span class="src-key">array&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$customParams&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<a href="http://www.php.net/get_class">get_class</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-str">'DomArDate'&nbsp;</span><span class="src-key">or&nbsp;</span><a href="http://www.php.net/is_string">is_string</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-id"><a href="../DomAr/Plugin/DomArDate.html">DomArDate</a></span><span class="src-sym">::</span><a href="../DomAr/Plugin/DomArDate.html#methodvalidate">validate</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)&nbsp;</span><span class="src-key">or&nbsp;</span><a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-num">0&nbsp;</span>:&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodinsert">insert</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$propertyValue</span><span class="src-sym">,&nbsp;</span><span class="src-id">DomArValueSet&nbsp;</span><span class="src-var">$set&nbsp;&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$propertyValue&nbsp;</span>=&nbsp;<span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Property/DomArProperty.html#var$name">name</a><span class="src-sym">}</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">)&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">isNull</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'NULL'&nbsp;</span>:&nbsp;<span class="src-str">'\''</span>.<span class="src-var">$propertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">date</span><span class="src-sym">(</span><span class="src-str">'Y-m-d'</span><span class="src-sym">)</span>.<span class="src-str">'\''</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a88"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$propertyValue&nbsp;</span>==&nbsp;<span class="src-str">''&nbsp;</span>?&nbsp;<span class="src-str">'NULL'&nbsp;</span>:&nbsp;<span class="src-str">'\''</span>.<span class="src-var">$propertyValue</span>.<span class="src-str">'\''</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$set</span><span class="src-sym">-&gt;</span><span class="src-id">set</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Property/DomArProperty.html#var$name">name</a><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodupdate">update</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArObject&nbsp;</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$propertyValue</span><span class="src-sym">,&nbsp;</span><span class="src-id">DomArValueSet&nbsp;</span><span class="src-var">$set&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$set</span><span class="src-sym">-&gt;</span><span class="src-id">set</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Property/DomArProperty.html#var$name">name</a><span class="src-sym">,&nbsp;</span><span class="src-sym">(</span><span class="src-var">$propertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">isNull</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'NULL'&nbsp;</span>:&nbsp;<span class="src-str">'\''</span>.<span class="src-var">$propertyValue</span><span class="src-sym">-&gt;</span><span class="src-id">date</span><span class="src-sym">(</span><span class="src-str">'Y-m-d'</span><span class="src-sym">)</span>.<span class="src-str">'\''</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/DomArProperty_DomArTranslatable.html#methodalterTable">alterTable</a><span class="src-sym">(&nbsp;</span><span class="src-id">DomArTable&nbsp;</span><span class="src-var">$table&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$table</span><span class="src-sym">-&gt;</span><span class="src-id">changeColumn</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../DomAr/Property/DomArProperty.html#var$name">name</a><span class="src-sym">,&nbsp;</span><span class="src-str">'date'</span><span class="src-sym">,&nbsp;</span><span class="src-id">true&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a100"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a105"></a><span class="src-key">class&nbsp;</span><a href="../DomAr/Plugin/Translatable.html">Translatable</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../DomAr/Plugin/Translatable.html#var$value">$value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a108"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a109"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../DomAr/Plugin/Translatable.html#method__get">__get</a><span class="src-sym">(</span><span class="src-var">$var</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a111"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a113"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a118"></a><span class="src-key">class&nbsp;</span><a href="../DomAr/Plugin/Sample.html">Sample</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../DomAr/DomArObject.html">DomArObject</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@orm</span><span class="src-doc">&nbsp;translatable&nbsp;text</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../DomAr/Plugin/Sample.html#var$title">$title</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@orm</span><span class="src-doc">&nbsp;translatable&nbsp;longtext</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../DomAr/Plugin/Sample.html#var$contents">$contents</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a128"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@orm</span><span class="src-doc">&nbsp;plugin&nbsp;DomArDateTime(now)</span></div></li>
<li><div class="src-line"><a name="a129"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../DomAr/Plugin/Sample.html#var$datetime">$datetime</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a132"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a134"></a><span class="src-var">$sample&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;&nbsp;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html">Sample</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$title">title</a></span><span class="src-sym">-&gt;</span><span class="src-id">est&nbsp;</span>=&nbsp;<span class="src-str">'Tere!'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$title">title</a></span><span class="src-sym">-&gt;</span><span class="src-id">eng&nbsp;</span>=&nbsp;<span class="src-str">'Hello!'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$contents">contents</a></span><span class="src-sym">-&gt;</span><span class="src-id">est&nbsp;</span>=&nbsp;<span class="src-str">'Sisu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a138"></a><span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$contents">contents</a></span><span class="src-sym">-&gt;</span><span class="src-id">eng&nbsp;</span>=&nbsp;<span class="src-str">'Contents'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a139"></a><span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$datetime">datetime</a>&nbsp;</span>=&nbsp;<span class="src-str">'now'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-comm">//&nbsp;Current&nbsp;default&nbsp;language&nbsp;is&nbsp;Est</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a143"></a>echo&nbsp;<span class="src-var">$sample</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../DomAr/Plugin/Sample.html#var$title">title</a></span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Tere!</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Fri, 24 Sep 2010 21:15:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</body>
</html>